//
//  ConfigMainTitleView.m
//  JinganMindCloud
//
//  Created by JinganMac on 2020/7/3.
//  Copyright © 2020 JingAn. All rights reserved.
//

#import "ConfigMainTitleView.h"

@interface ConfigMainTitleView ()

@property (nonatomic, strong) UILabel *mainTitleView;

@end

@implementation ConfigMainTitleView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self addSubview:self.mainTitleView];
    }
    return self;
}

-(void)layoutSubviews{
    [_mainTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(self);
    }];
}

-(UILabel *)mainTitleView{
    if (!_mainTitleView) {
        _mainTitleView = [UILabel new];
        _mainTitleView.textColor = [UIColor colorWithHexString:@"#535353"];
        _mainTitleView.font = [UIFont boldSystemFontOfSize:14.];
        _mainTitleView.numberOfLines = 0;
        _mainTitleView.text = @"----";
    }
    return _mainTitleView;
}

-(void)setBaseVaule:(NSString *)baseVaule{
     self.mainTitleView.text = baseVaule;
}

-(void)setViewConfiSets:(CellSubViewsConfigSetting *)viewConfiSets{
    self.mainTitleView.text = viewConfiSets.cTitleValue;
    if (viewConfiSets.tFontColor) {
        NSString *hexColor = [NSString stringWithFormat:@"#%@",viewConfiSets.tFontColor];
        _mainTitleView.textColor = [UIColor colorWithHexString:hexColor];
    }
    if (viewConfiSets.tFontSize) {
        _mainTitleView.font =viewConfiSets.tFontBlod?[UIFont boldSystemFontOfSize:viewConfiSets.tFontSize]:[UIFont systemFontOfSize:viewConfiSets.tFontSize];
    }
}

-(void)setBaseAttriString:(NSAttributedString *)baseAttriString{
    self.mainTitleView.attributedText = baseAttriString;
}

@end
